package com.qianchang.microfinance.bean;

import com.bigkoo.pickerview.model.IPickerViewData;

import java.util.List;

/**
 * Created by jinbailiang on 2017/8/24.
 */

public class ProductConfigBean {


    /**
     * daysPerMonth : 30
     * deadlineDayList : [{"grade":"vip1","gradeId":"00101480153463148101","month":"1-180","monthRate":"0.0500","unit":"0","weiyuejinRate":"0.0500"}]
     * deadlineMonthList : [{"grade":"vip1","gradeId":"00101480153463148101","month":"1","monthRate":"0.0100","unit":"1","weiyuejinRate":"0.0100"},{"grade":"vip1","gradeId":"00101480153463148101","month":"2","monthRate":"0.0200","unit":"1","weiyuejinRate":"0.0200"},{"grade":"vip1","gradeId":"00101480153463148101","month":"3","monthRate":"0.0300","unit":"1","weiyuejinRate":"0.0300"},{"grade":"vip1","gradeId":"00101480153463148101","month":"6","monthRate":"0.0400","unit":"1","weiyuejinRate":"0.0400"}]
     * productInfo : {"id":"0","productName":"简易贷","productType":"0","productTypeDesc":"cash","repaymentTypes":"0;1;2;3","serviceFeeSetting":"1","status":"0","updateTime":"2017-09-01 13:48:40"}
     * repaymentType : [{"name":"一次性还款付息","type":"0"},{"name":"等额本息","type":"1"},{"name":"等额本金","type":"2"},{"name":"每月付息，到期还本","type":"3"}]
     */

    private int daysPerMonth;
    private ProductInfoBean productInfo;
    private List<DeadlineDayListBean> deadlineDayList;
    private List<DeadlineMonthListBean> deadlineMonthList;
    private List<RepaymentTypeBean> repaymentType;

    public int getDaysPerMonth() {
        return daysPerMonth;
    }

    public void setDaysPerMonth(int daysPerMonth) {
        this.daysPerMonth = daysPerMonth;
    }

    public ProductInfoBean getProductInfo() {
        return productInfo;
    }

    public void setProductInfo(ProductInfoBean productInfo) {
        this.productInfo = productInfo;
    }

    public List<DeadlineDayListBean> getDeadlineDayList() {
        return deadlineDayList;
    }

    public void setDeadlineDayList(List<DeadlineDayListBean> deadlineDayList) {
        this.deadlineDayList = deadlineDayList;
    }

    public List<DeadlineMonthListBean> getDeadlineMonthList() {
        return deadlineMonthList;
    }

    public void setDeadlineMonthList(List<DeadlineMonthListBean> deadlineMonthList) {
        this.deadlineMonthList = deadlineMonthList;
    }

    public List<RepaymentTypeBean> getRepaymentType() {
        return repaymentType;
    }

    public void setRepaymentType(List<RepaymentTypeBean> repaymentType) {
        this.repaymentType = repaymentType;
    }

    public static class ProductInfoBean {
        /**
         * id : 0
         * productName : 简易贷
         * productType : 0
         * productTypeDesc : cash
         * repaymentTypes : 0;1;2;3
         * serviceFeeSetting : 1
         * status : 0
         * "applyMoneyEnd": "2000.00",
         * "applyMoneyStart": "1000.00",
         * updateTime : 2017-09-01 13:48:40
         */

        private String id;
        private double applyMoneyEnd;
        private double applyMoneyStart;
        private String productName;
        private String productType;
        private String productTypeDesc;
        private String repaymentTypes;
        private String serviceFeeSetting;
        private String status;
        private String updateTime;
        private double borrowFeeRate;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getProductName() {
            return productName;
        }

        public void setProductName(String productName) {
            this.productName = productName;
        }

        public String getProductType() {
            return productType;
        }

        public void setProductType(String productType) {
            this.productType = productType;
        }

        public String getProductTypeDesc() {
            return productTypeDesc;
        }

        public void setProductTypeDesc(String productTypeDesc) {
            this.productTypeDesc = productTypeDesc;
        }

        public String getRepaymentTypes() {
            return repaymentTypes;
        }

        public void setRepaymentTypes(String repaymentTypes) {
            this.repaymentTypes = repaymentTypes;
        }

        public String getServiceFeeSetting() {
            return serviceFeeSetting;
        }

        public void setServiceFeeSetting(String serviceFeeSetting) {
            this.serviceFeeSetting = serviceFeeSetting;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(String updateTime) {
            this.updateTime = updateTime;
        }

        public double getApplyMoneyEnd() {
            return applyMoneyEnd;
        }

        public void setApplyMoneyEnd(double applyMoneyEnd) {
            this.applyMoneyEnd = applyMoneyEnd;
        }

        public double getApplyMoneyStart() {
            return applyMoneyStart;
        }

        public void setApplyMoneyStart(double applyMoneyStart) {
            this.applyMoneyStart = applyMoneyStart;
        }

        public double getBorrowFeeRate() {
            return borrowFeeRate;
        }

        public void setBorrowFeeRate(double borrowFeeRate) {
            this.borrowFeeRate = borrowFeeRate;
        }
    }

    public class DeadlineDayListBean implements IPickerViewData {
        /**
         * grade : vip1
         * gradeId : 00101480153463148101
         * month : 1-180
         * monthRate : 0.0500
         * unit : 0
         * weiyuejinRate : 0.0500
         */

        private String grade;
        private String gradeId;
        private String month;
        private double monthRate;
        private String weiyuejinRate;
        private String unit;

        public DeadlineDayListBean() {
        }

        public DeadlineDayListBean(String month, double monthRate, String weiyuejinRate) {
            this.month = month;
            this.monthRate = monthRate;
            this.weiyuejinRate = weiyuejinRate;
        }

        public String getGrade() {
            return grade;
        }

        public void setGrade(String grade) {
            this.grade = grade;
        }

        public String getGradeId() {
            return gradeId;
        }

        public void setGradeId(String gradeId) {
            this.gradeId = gradeId;
        }

        public String getMonth() {
            return month;
        }

        public void setMonth(String month) {
            this.month = month;
        }

        public double getMonthRate() {
            return monthRate;
        }

        public void setMonthRate(double monthRate) {
            this.monthRate = monthRate;
        }

        public String getUnit() {
            return unit;
        }

        public void setUnit(String unit) {
            this.unit = unit;
        }

        public String getWeiyuejinRate() {
            return weiyuejinRate;
        }

        public void setWeiyuejinRate(String weiyuejinRate) {
            this.weiyuejinRate = weiyuejinRate;
        }

        @Override
        public String getPickerViewText() {
            return month;
        }
    }

    public static class DeadlineMonthListBean implements IPickerViewData {
        /**
         * grade : vip1
         * gradeId : 00101480153463148101
         * month : 1
         * monthRate : 0.0100
         * unit : 1
         * weiyuejinRate : 0.0100
         */

        private String grade;
        private String gradeId;
        private int month;
        private double monthRate;
        private String unit;
        private String weiyuejinRate;

        public String getGrade() {
            return grade;
        }

        public void setGrade(String grade) {
            this.grade = grade;
        }

        public String getGradeId() {
            return gradeId;
        }

        public void setGradeId(String gradeId) {
            this.gradeId = gradeId;
        }

        public int getMonth() {
            return month;
        }

        public void setMonth(int month) {
            this.month = month;
        }

        public double getMonthRate() {
            return monthRate;
        }

        public void setMonthRate(double monthRate) {
            this.monthRate = monthRate;
        }

        public String getUnit() {
            return unit;
        }

        public void setUnit(String unit) {
            this.unit = unit;
        }

        public String getWeiyuejinRate() {
            return weiyuejinRate;
        }

        public void setWeiyuejinRate(String weiyuejinRate) {
            this.weiyuejinRate = weiyuejinRate;
        }

        @Override
        public String getPickerViewText() {
            return String.valueOf(month) + "个月";
        }
    }

    public static class RepaymentTypeBean implements IPickerViewData {
        /**
         * name : 一次性还款付息
         * type : 0
         */

        private String name;
        private String type;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        @Override
        public String getPickerViewText() {
            return name;
        }
    }


    //    ==================================
    public static class DeadlineDayList {
        private String grade;

        private String gradeId;

        private String month;

        private double monthRate;

        private String unit;

        private String weiyuejinRate;

        public void setGrade(String grade) {
            this.grade = grade;
        }

        public String getGrade() {
            return this.grade;
        }

        public void setGradeId(String gradeId) {
            this.gradeId = gradeId;
        }

        public String getGradeId() {
            return this.gradeId;
        }

        public void setMonth(String month) {
            this.month = month;
        }

        public String getMonth() {
            return this.month;
        }

        public void setMonthRate(double monthRate) {
            this.monthRate = monthRate;
        }

        public double getMonthRate() {
            return this.monthRate;
        }

        public void setUnit(String unit) {
            this.unit = unit;
        }

        public String getUnit() {
            return this.unit;
        }

        public void setWeiyuejinRate(String weiyuejinRate) {
            this.weiyuejinRate = weiyuejinRate;
        }

        public String getWeiyuejinRate() {
            return this.weiyuejinRate;
        }

    }

    //==================================
    public static class DeadlineMonthList {
        private String grade;

        private String gradeId;

        private String month;

        private double monthRate;

        private String unit;

        private String weiyuejinRate;

        public void setGrade(String grade) {
            this.grade = grade;
        }

        public String getGrade() {
            return this.grade;
        }

        public void setGradeId(String gradeId) {
            this.gradeId = gradeId;
        }

        public String getGradeId() {
            return this.gradeId;
        }

        public void setMonth(String month) {
            this.month = month;
        }

        public String getMonth() {
            return this.month;
        }

        public void setMonthRate(double monthRate) {
            this.monthRate = monthRate;
        }

        public double getMonthRate() {
            return this.monthRate;
        }

        public void setUnit(String unit) {
            this.unit = unit;
        }

        public String getUnit() {
            return this.unit;
        }

        public void setWeiyuejinRate(String weiyuejinRate) {
            this.weiyuejinRate = weiyuejinRate;
        }

        public String getWeiyuejinRate() {
            return this.weiyuejinRate;
        }
    }
}
